function check_right(){
        var flag=false;                              
        var name = document.getElementById('group_name');
        if(name.value==''){
                return false;
        }
        var rights = document.getElementsByName('role_id');
        var len = rights.length;
        for (i=0;i<len;i++){
                if(rights[i].checked==true){
                        flag=true;
                        break;
                }
        }
        if(flag==true){ 
                return true;
        }else{
                alert('No right checked,Please check one!');
                return false;
        }
}
function delete_group(id,name){
        if(confirm("Are you sure to delete this group?")){
                location.href="/bin/root.py/delete_group?group_id="+id+"&amp;group_name="+name;
                return true;                    
        }else{
                return false;
        }
}
